﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework5
{
    class Program1
    {
        static void Main(string[] args)
        {
            List<int> primeNumList = new List<int>();
            for (int i = 2; i < 101; i++)
            {
                int num = 0;
                int j;
                for (j = 2; j < i; j++)
                {
                    if (i % j == 0) num++;
                }
                if (num == 0) primeNumList.Add(i);
            }

            List<string> evenNumList = new List<string>();
            for (int i = 6; i < 101; i++)
            {
                if (i % 2 == 0)
                {
                    evenNumList.Add(i.ToString());
                }
            }

            IEnumerator enumeratorEven = evenNumList.GetEnumerator();
            while (enumeratorEven.MoveNext())
            {
                string str = enumeratorEven.Current as string; 
                int num = Int32.Parse(str);
                foreach (int primeNum in primeNumList)
                {
                    if (primeNum < num && IsPrime(num - primeNum))
                    {
                        Console.WriteLine("{0} = {1} + {2}", num, primeNum, num - primeNum);
                    }
                }
            }
        }

        static bool IsPrime(int num)
        {
            int a = 0;
            int i;
            for (i = 2; i < num; i++)
            {
                if (num % i == 0) a++;
            }
            if (a == 0&& num>1) return true;
            else
                return false;
        }
    }
}
